package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Aite;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AiteMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Aite record);

    Aite selectByPrimaryKey(Long id);

    List<Aite> selectAll();

    int updateByPrimaryKey(Aite record);

    /**]
     * 查询未读的消息数
     * @param authorId
     * @param read
     * @return
     */
    int getAiteNum(@Param("authorId") Long authorId, @Param("read") int read);

    List<Map<String,Object>> getAiteMessageByUserId(@Param("authorId") Long authorId);

    void updateAiteState(@Param("authorId") Long authorId, @Param("state") int state);
}